package com.njtoyo.taxi.admin.mapper.master.entity.local_service;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.njtoyo.taxi.admin.mapper.master.enums.local_service.LifeMerchantMemberOrderState;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 订单表
 * </p>
 *
 * @author Dell
 * @since 2022-03-03
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "LifeMerchantMemberOrder对象", description = "订单表")
public class LifeMerchantMemberOrder implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "商品流水号")
    private String number;

    @ApiModelProperty(value = "会员ID")
    private Long memberId;

    @ApiModelProperty(value = "商家ID")
    private Long merchantId;

    @ApiModelProperty(value = "商品ID")
    private Long merchantCommodityId;

    @ApiModelProperty(value = "数量")
    private Integer quantity;

    @ApiModelProperty(value = "总价(单位为分)")
    private Integer totalPrice;

    @ApiModelProperty(value = "总积分")
    private Integer totalPoint;

    @ApiModelProperty(value = "实际支付(单位为分)")
    private Integer actualPayment;

    @ApiModelProperty(value = "余额支付(单位为分)")
    private Integer balancePaid;

    @ApiModelProperty(value = "商品快照")
    private String commodityArchive;

    @ApiModelProperty(value = "订单状态 0:init[初始化],1:operated[支付中],2:done[已支付],3:cancel[已取消]")
    private LifeMerchantMemberOrderState state;

    @ApiModelProperty(value = "支付时间")
    private Integer paidTimestamp;

    @ApiModelProperty(value = "是否需要线下自提")
    private Boolean isOfflinePickup;

    @ApiModelProperty(value = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    private Date createdAt;

    @ApiModelProperty(value = "修改时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updatedAt;


}
